package com.neusoft.utils;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;


/**
 * @author akemihomurasama
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Result {
    private Boolean success;
    private String errorMsg;
    private Object data;
    private Integer statues;

    public static Result ok() {
        return new Result(true, null, null, 200);
    }

    public static Result ok(Object data) {
        return new Result(true, null, data, 200);
    }

    public static Result fail(String errorMsg) {
        return new Result(false, errorMsg, null, 500);
    }
}
